package mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import pojo.Business;

import java.util.List;

public interface IBusinessMapper {
    @Select("select * from business")
    List<Business> getBusinessList();
    //根据ID查询商家列表
    @Select("select * from business where businessID=#{id}")
    Business findBusinessById(@Param("id") Integer id);

    //查询前3条作为推荐商家
    @Select("select * from business limit 0,3")
    List<Business> getTop3BusinessList();

    //根据orderTypeID查询商家列表
    @Select("select * from business where orderTypeId=#{id}")
    List<Business> findBusinessByOrderTypeId(@Param("id") Integer id);
}
